<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8"></meta>
    <meta http-equiv="X-UA-Compatible" content="IE=edge"></meta>
    <title>AdminLTE 2 | Dashboard</title>
   <script type="text/javascript" th:inline="JavaScript">
   
   
   </script>
</head>
<body class="hold-transition skin-blue sidebar-mini">
<div class="wrapper">
    <div th:fragment="sidebar">
        <aside class="main-sidebar">
             <div class="user-panel">
       			<div class="small-user" style="display: none;"><i class="fa fa-user"></i></div>
				<div class="pull-left info">
			        <div class="login-row">
			        	<p class="pull-left" id="username"><i class="fa fa-user"></i><span></span></p>
			        	<p class="pull-right" sec:authorize="hasAuthority('manage')">
			        		<a  href="/">前台页面>></a>
			        	</p>
			        </div> 
			        <div  class="login-row">
			        	<span class="pull-left text-muted" ></span>
			        	<p class="pull-right">
			        		<button type="button" onclick="window.location.href='/logout'" class="btn btn-block btn-success btn-xs">注销</button>
			        	</p>
			        </div>
			   </div>
			</div>	
            	
              <section class="sidebar" style="height: auto;">
                    <!-- sidebar menu: : style can be found in sidebar.less -->
				 <ul class="sidebar-menu orgMenu">
				    <li class="header">组织列表</li> 
                 </ul>
                 
                 <!-- 设备管理 -->
                 <ul class="sidebar-menu sidebar-menu1 deviceMenu">
					<li class="treeview">
					    <a href="javascript:deviceList();">
					        <i class="fa  fa-cubes"></i>
					        <span>设备管理</span>
					    </a>
					</li>
                 </ul>
 					<!-- 设备类型 -->
                 <ul class="sidebar-menu sidebar-menu1 deviceMenu">
					<li class="treeview">
					    <a href="javascript:deviceTypeList();">
					        <i class="fa  fa-cog"></i>
					        <span>设备类型</span>
					    </a>
					</li>
                 </ul>
                 	<!-- 用户类型 -->
                  <ul class="sidebar-menu sidebar-menu1 deviceMenu">
					<li class="treeview">
					    <a href="javascript:sysUserList();">
					        <i class="fa fa-users"></i>
					        <span>用户管理</span>
					    </a>
					</li>
                 </ul>
                 <!-- 角色管理  -->
<!--                   <ul class="sidebar-menu sidebar-menu1 deviceMenu">
					<li class="treeview">
					    <a href="javascript:roleUserList();">
					        <i class="fa fa-users"></i>
					        <span>角色管理</span>
					    </a>
					</li>
                 </ul> -->
                 	<!-- 报警类型 -->
                 <ul class="sidebar-menu sidebar-menu1 deviceMenu">
                 	<li class="treeview">
                 		<a href="javascript:alarmTypeList()">
                 			<i class="fa fa-users"></i>
                 			<span>报警类型</span>
                 		</a>
                 	</li>
                 </ul>
                 
            </section>


<script src="/webjars/adminlte/2.3.11/plugins/jQuery/jquery-2.2.3.min.js"></script>
	        <script type="text/javascript">
				function deviceList () {
				   		$.ajax({
					         url: "/device/list" ,
					         type: 'POST',
					         dataType: 'html',
					         success: function(data) {
				 				$("#orgList").html(data);
				 				console.log(9999)
				          	},
							error: function (error) {
								alert(error);
							}
				       	});
				}
			</script>
			<script type="text/javascript">
				function deviceTypeList () {
			   		$.ajax({
				         url: "/deviceType/list" ,
				         type: 'POST',
				         dataType: 'html',
				         success: function(data) {
			 				$("#orgList").html(data);
			          	},
						error: function (error) {
							alert(error);
						}
			       	});
				}
			</script>
			<script type="text/javascript">
				function sysUserList () {
				   		$.ajax({
					         url: "/user/list/",
					         type: 'POST',
					         dataType: 'html',
					         success: function(data) {
				 				$("#orgList").html(data);
				          	},
							error: function (error) {
								alert(error);
							}
				       	});
				}
			</script>

 			<script type="text/javascript">
				function roleUserList () {
				   		$.ajax({
					         url: "/role/list/",
					         type: 'POST',
					         dataType: 'html',
					         success: function(data) {
				 				$("#orgList").html(data);
				          	},
							error: function (error) {
								alert(error);
							}
				       	});
				}
			</script>
			
			<script type="text/javascript">
				function alarmTypeList(){
						$.ajax({
							url: "/alarmType/list/",
							type: 'POST',
							dataType: 'html',
							success:function(data){
								$("#orgList").html(data);
							},
							error:function(error){
								alert(error);
							}
						});
				}
				
			</script>

        </aside>

    </div>
</div>


</body>
</html>

